﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using XCore.Dependency;

namespace SaaS.Cache.Blogs
{
    public class ArticleCacheService : CacheServiceBase, ISingletonDependency
    {
        /// <summary>
        /// 文章浏览量
        /// </summary>
        private const string ARTICLE_FLOW = "ARTICLE_FLOW_";
        public Task<long> FlowAsync(int id)
        {
            string key = ARTICLE_FLOW + id;
            return Redis.StringIncrementAsync(key);
        }
    }
}
